package com.whmall.service.crm.module.company.convert;

import com.whmall.component.common.ObjectConverter;
import com.whmall.service.crm.entity.dto.company.CompanyInformationRspDTO;
import com.whmall.service.crm.module.company.entity.CompanyInformationDO;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Author yangkuan
 * @Date 2020/8/5 14:59
 **/
@Component
public class CompanyInformation2CompanyInformationDTO implements ObjectConverter<CompanyInformationDO, CompanyInformationRspDTO> {

    @Override
    public CompanyInformationRspDTO fillProperties(CompanyInformationDO source, CompanyInformationRspDTO dest) {
        if (null == dest) {
            dest = new CompanyInformationRspDTO();
        }
        dest.setTel(source.getTel());
        dest.setOtherSource(source.getOtherSource());
        dest.setAddress(source.getAddress());
        dest.setSupplierOrderSpecialRequirement(source.getSupplierOrderSpecialRequirement());
        dest.setIntroduce(source.getIntroduce());
        dest.setWebsite(source.getWebsite());
        dest.setLogoUrl(source.getLogoUrl());
        dest.setNotUploadBl(source.getNotUploadBl());
        dest.setMaxProductCount(source.getMaxProductCount());
        dest.setFecaQueryDataCycle(source.getFecaQueryDataCycle());
//        dest.setInvoiceEmail(source.getInvoiceEmail());

        return dest;
    }
}
